<?php
require 'Model.php';

class IndexModel extends Model {
    function __construct()
    {
        parent::__construct();
    }

    function indexHotRent(){
        $sql="select * from house ORDER BY rent  DESC limit 0,3";
        $result = $this->conn->query($sql);
        return $result;
    }

    function indexHotSale(){
        $sql="select * from house ORDER BY price DESC limit 0,3";
        $result=$this->conn->query($sql);
        return $result;
    }

    function getflag($uname){
        $sql="select flag from user where uname='$uname'";
        $result=$this->conn->query($sql);
        return $result;
    }
}
?>